<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.setAttribute("basePath", basePath);
%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico"/>
<link rel="stylesheet" type="text/css" href="${basePath}/css/default/om-default.css" />
<link rel="stylesheet" href="${basePath}/css/base.css" />
<link rel="stylesheet" href="${basePath}/css/meroperation.css" />
<link rel="stylesheet" type="text/css" href="${basePath}/css/grid-extra.css" />
<script type="text/javascript" src="${basePath}/js/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${basePath}/js/operamasks-ui.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${basePath}/js/om-grid.js" charset="utf-8"></script>
<script type="text/javascript" src="${basePath}/js/om-calendar.js" charset="utf-8"></script>
<script type="text/javascript" src="${basePath}/js/util.js"></script>
<script type="text/javascript" src="${basePath}/js/tools.js" charset="utf-8"></script>
<title>Insert title here</title>
<script type="text/javascript">
	
$(function(){
	
	

})

function passwordSave()
{
	
	var par = new Object();
	var userstr =  $('#user').val();
	var user =  JSON.parse(userstr);
	user.password = $('#password').val();
	$.ajax({
		type: "POST",
        url: "${basePath}/privilege/user/modifyPassword.do",
        data: user,
        dataType: "json",
        success: function(data){
        	if(data.success)
        	{
        		alert("修改成功");	
        	}else{
        		alert(data.message);
        	}
        }
	});
}

	
</script>

	<style type="text/css">
	.ui-search-item tr{height: 60px}
	</style>

</head>
<body>
		<div class='ui-nav fn-clear pl15'>
		    <div class='fn-left ft-14 pt5'><strong>权限管理    > 密码修改</strong></div>
		</div>
		<div class='ui-box-container'>
				<form id='selectForm' method="post" style="margin-top: 30px;margin-left: 30px">
				    <table class='ui-search-item' >
				    	<tr>
				    		<td>
				    			<label>密码</label>
				    			<input type="hidden" id="user" value='${user}'/>
				    			<input type="text" id="password" name="password"/>
				    		</td>
				    	</tr>
				    	<tr>
				    		<td>
				    			<label>重复密码</label>
				    			<input type="text" id="r_password" name="r_password"/>
				    		</td>
				    	</tr>
				    	<tr>
				    		<td >
				    			<button id='button' type='button' class='iconrept btn ml3' onclick="passwordSave()" style="margin-left: 80px">
		             				<span></span>保存
		             			</button>
				    		</td>
				    	</tr>
				    </table>
		</div>
</body>
</html>